1. Field of the Invention
A method for loading configuration data onto a non-volatile memory and a device using the same is provided, and more In particular, a non-volatile memory with a pre-load zone onto which the configuration data is loaded during its manufacturing process, and the configuration data is automatically loaded onto a RAM as the device is powered on.
2. Description of Related Art
Conventional memory devices require that various specifications of different flash memory modules from various manufacturers be compatible, that is, that the memory device must include a plurality of memory types or their specifications. Thus the data for all types of flash memory are directly loaded onto the firmware of prior art devices, wherein the firmware having the data is a preferred implementation for overcoming the problems thereof.
For example, the configuration data of flash memory modules are loaded onto a read-only memory (ROM), which is part of the firmware. The manufacturing method of a semiconductor therefore, such as the steps of photo-masking or etching, includes all the required information, therefore a large memory size is needed and manufacturing the device is a time consuming process. If any configuration of the flash memory is changed by the manufacturer, the manufacturing process needs to be amended, updated or re-designed. Obviously this increases costs and slows the manufacturing process.
In consideration of the mentioned drawback of the conventional art, the variational part of the configuration data of the specific flash memory is stored onto a writable/erasable medium in the prior art, so that it's convenient to update or amend the program therein afterward.
Reference is made to FIG. 1 showing a schematic diagram of a typical flash memory device. The flash memory device comprises a flash memory portion 101 having a plurality of flash memory blocks 103, a random-access memory (RAM) 105 and a special function register (SFR) 107. The special function register 107 is an inner controller of a single chip and also a buffer used for the plural peripheral modules. A vector table 109 is disposed to select a memory address corresponding to an interrupt service routine (ISR) within the controller.
When the above-mentioned firmware is being updated or amended, a method and apparatus for dynamically modifying a stored program (U.S. Publication App. No. 2003/0005212) is provided. Reference is made to FIG. 2 showing a schematic diagram of a memory being updated dynamically. The memory is a writable and programmable flash memory 101, wherein the correction code is stored on at least one of a plurality of correction blocks 203 included in an erasable programmable memory and a program having instructions is stored on a program block 205. Furthermore, the flash memory correction initialization commands are stored on a command block 207, and a CPU rewrite code is stored on a CPU code block 209.
In the mentioned prior art, the CPU rewrite code stored on the CPU code block 209 will be saved on the random-access memory 211 firstly as the memory device is being amended or updated. In the meantime, a universal asynchronous receiver transmitter (UART) 213 used for transmitting or receiving flash memory portion 101 loads the codes from an external device into the flash memory device in the step of updating or amending.
Referring to U.S. Pat. No. 6,795,872, another updating means discloses maintaining at least partial functionality of a device as defined by a hardware configuration at a USB bus enumeration while the device memory is being programmed. As the device powers on, the state of the firmware thereto is configured as writable. Then a computer performs a linkage with the device via an interface, like a USB (Universal Serial Bus), thus a user can configure the setting thereof, furthermore, a driver or another means therefore can perform any modification via the interface. For the duration of the modification, a control program, which is loaded into a random-access memory (RAM), is executed in the device, after that, the computer transfers the required commands to perform the modification.
U.S. Publication App. No. 2005/0120343 discloses a method for loading a firmware program. Reference is made to FIG. 3, wherein a USB host controller 305 of a computer host 31 connects to a USB device 30 via a USB bus. The USB device 30 has a micro-processing unit (MPU) 304, an EEPROM 301, a memory 302 and a timer 303 that are coupled to the micro-processing unit 304. The USB device 30 downloads data or the updating program of the firmware via the micro-processing unit 304 of the computer host 31, wherein the EEPROM 301 stores up the application program, boot-up codes, and the memory 302 stores up some regular data.
In the mentioned prior arts, an external writable/erasable memory, such as the random-access memory (RAM), is used for modifying or updating the firmware of the device. However, some other possible modifying or updating methods are provided, for example, an additional flash memory block or a writable memory block manufactured on a read-only memory are the means for achieving the above-mentioned purpose. In particular, the present invention further provides a method for loading configuration data onto a non-volatile memory and a device using the same.